Method and system for gesture recognition

ABSTRACT

A method and system for recognizing gestures on an electronic device, such as a mobile device (e.g., watch), are disclosed. In one example embodiment, the method includes obtaining a gesture template, determining a first mean value based upon the gesture template, obtaining gesture data by way of a motion sensing component of the electronic device, and calculating (by way of a processing device) a correlation metric based at least indirectly upon the gesture data and the gesture template, where the correlation metric is calculated based at least in part upon the first mean value. The method also includes determining based at least in part upon the correlation metric that a first of the gestures has occurred, and taking at least one additional action based at least in part upon the determining.

FIELD OF THE DISCLOSURE

The present disclosure relates to electronic devices such as mobiledevices and, more particularly, to methods and systems for recognizingor facilitating the recognition of gestures at or in relation to suchelectronic devices.

BACKGROUND OF THE DISCLOSURE

Mobile devices such as smart phones, tablet computers, and gamingcontrollers increasingly include capabilities for recognizingaccelerometer-based gestures. An electronic device held by or mountedupon the user (or a body portion thereof) senses movements of the bodythat can be detected by the electronic device and recognized as agesture. Gesture recognition in electronic devices is becoming ofincreasing importance insofar as gestures (and recognition of gestures)can provide a natural, immediate, intuitive manner of inputting commandsor signals to an electronic device that can serve to initiate, activate,or trigger functionality of the electronic device or otherwise have aninfluence on the electronic device.

Notwithstanding the value and increasing importance of gesturerecognition in relation to a wide variety of electronic devices, itremains difficult in many contexts for electronic devices to recognizethat gestures have occurred or to recognize exactly what gestures haveoccurred even if some gesture-like behavior has been detected. First,gestures can be difficult to recognize because, even though a given typeof gesture involves characteristic movements, any given performance ofthe gesture will typically vary from other performances of the gesture.Thus, successful gesture recognition requires that the recognitionmechanism not only be capable of distinguishing intended gesturemovements from other movements, but also be tolerant of variations inthe movement associated with different instances of that given type ofgesture so that those different instances can all be recognized asgestures of that given type.

Further, in embodiments where gestures are to be sensed as movements byway of accelerometers or gyroscope signals, the proper recognition ofgestures can be impeded by imperfect or inaccurate operation of theaccelerometers (or other sensors, such as gyroscopes), or to the extentthat the signals from such sensing devices include significant noiselevels. Thus, there are opportunities to improve accelerometer-basedgesture recognition within electronic devices.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows in schematic form an example electronic device, which isconfigured to perform gesture recognition, positioned on a user's lowerarm (shown in phantom) and in relation to example coordinate axes, andfurther shows the electronic device in three alternative tiltarrangements;

FIG. 2 is a block diagram showing example components of the electronicdevice of FIG. 1;

FIGS. 3-5 are schematic diagrams illustrating a fist bump gesture, ahandshake gesture, and a handwave gesture, respectively;

FIG. 6 is a graph of example sample y-acceleration data associated withexample fist bump gestures such as that illustrated by FIG. 3;

FIGS. 7 and 8 are graphs showing example fist bump gesture patterns thatcan be generated at least partly based upon the data of FIG. 6, wherethe graph of FIG. 8 can be considered to show an example fist bumpgesture template, and the graph of FIG. 8 is the same as that of FIG. 7except insofar as latter portions of the patterns of FIG. 7 are notpresent in the graph of FIG. 8;

FIGS. 9 and 10 respectively show graphs of example handshake gesture andhandwave gesture templates, respectively, which can be generated basedupon sample data;

FIGS. 11-13 respectively show example offset templates, scaled templates(expanded), and scaled templates having the same mean, respectively.

FIG. 14 is a state diagram illustrating example states of operation (andtransitions between those states) of the electronic device of FIG. 1 asit performs gesture recognition; and

FIG. 15 is a flow chart showing example steps of operation of theelectronic device of FIG. 1 in performing gesture recognition.

DETAILED DESCRIPTION

Embodiments described herein include, but are not limited to, methods orsystems for recognizing gestures at or in relation to electronicdevices, including mobile devices and personal electronic devices. In atleast some embodiments, the methods or systems operate by determiningscore(s) regarding possible gesture inputs so that, rather than merelydetermining whether gestures have occurred, the methods or systemsascribe value(s) that represent a likelihood of whether a recognizablegesture has occurred upon receipt of gesture input data. By determiningscore(s) of this type (instead of merely making hard or binary decisionsas to whether gestures have occurred), such methods or systems (a)reduce the costs associated with false negatives or false positives (inthis regard, it should be understood that these costs can be understoodto exist both at the level of gesture detection or algorithmic level,and also at a higher level that is the level of a user or the level ofapplication(s) that operate based upon gesture detection), and also (b)allow for the gesture input data and score(s) representative thereof tobe utilized in combination with other information such as informationconcerning a user's context (e.g., the user's location and/or cloudcomputing based context), which can further enable accurate gesturedetection and/or make possible other enhancements to the operation ofthe electronic device.

Additionally, depending upon the embodiment, the methods and systems canemploy any of a variety of metrics in determining or evaluating thescore(s) regarding possible gesture inputs. In at least someembodiments, the methods and systems particularly employ one or more ofcorrelation metrics and/or peak-to-peak (p2p) metrics based on sensorinput. A correlation metric (or combinations of them) in someembodiments can be interpreted as a score or likelihood that a gestureoccurred. Further, in some embodiments, comparing p2p metrics tothresholds (or to other peak-to-peak thresholds) aids in detecting agesture. Also, for some sensor inputs, use of p2p metrics can replaceneeding to calculate a correlation metric. Additionally in someembodiments, a subset of possible correlation and p2p metrics is/arecalculated and compared to threshold(s) to judge whether a gestureoccurred. Further, in at least some embodiments, the methods and systemsdescribed herein operate at least in part by way of a state machine thatis used to control algorithmic operations, and that can particularlyserve to reduce algorithmic operations when implementing a givenembodiment of this disclosure.

It is envisioned that methods and systems described herein can beutilized to recognize a variety of types of spatial gestures, in whichmovement of a user (or a body portion of the user) causes correspondingmovement of the electronic device itself (e.g., because the electronicdevice is attached to the body portion), and the electronic devicesenses its own movement in space and thereby senses the gesture.

At least some embodiments described herein are particularly implementedat or in relation to electronic devices that are attached to the bodyportion of a user, such as a watch strapped to a user's wrist. In suchembodiments, the methods and systems for gesture recognition implementedon the electronic device (wristwatch) can be suited for recognizinggestures associated with the movements of the user's wrist, which arethe same or essentially the same as the movements of the watch itself,and which can be sensed by a three-dimensional accelerometer sensorinput provided by an accelerometer included in the watch (or similarinputs provided by other motion-sensing devices like a gyroscope). Amongthe gestures that can be sensed are, for example, a handshake gesture, ahandwave gesture, and a fist bump gesture.

The present disclosure envisions a robust procedure for recognizinggestures. The procedure can involve gathering a collection of recordedtrials, potentially including trials with multiple users, multipletrials per user, and/or multiple sensor inputs for each trial, anddetermining model constants including template length, where there willbe one template (or “snippet”) for each sensor input (averaged over alltrials). Further, upon analyzing the trial information and creating agesture template, then real-time gestures can be recognized. The mannerin which gestures are recognized can take into account various issues.For example, some position metrics can be taken into account asindications of good position, and positional variations that areindicative of bad/inappropriate positions can be ignored assuming thedurations of such bad/inappropriate positions are short. Also in atleast some embodiments, gesture recognition takes into account whichsensor inputs to use, which metrics to use, which metric/sensor inputcombinations to use, and what threshold settings to use. In at leastsome embodiments, linear regression can be performed to determine bestpredictors for recognition of a gesture based on the recorded trials andmodel constants. Also, models can be validated against new trials.

Referring to FIG. 1, an example electronic device 100 is awristwatch-type product shown in a first image 101 to be positioned onand supported by a lower arm or wrist 102 of a user (shown in phantom)using a wristband 104. Given this arrangement, the electronic device 100moves along with the lower arm 102 when the user moves the lower arm toperform gestures as described below. In this drawing, the electronicdevice 100 is worn on a dorsal side of a left wrist. The wristwatch,however, may be worn in a variety of ways including on the left or rightarm, on the dorsal side or the palmar side. Note also that the band 104may be tighter or looser depending on user preference.

In the present embodiment, the electronic device 100 particularlyincludes a display 106 that is both able to display visual imagesincluding a time and a message, for example, as would be displayed whenused as a stopwatch or a wristwatch. The electronic device 100 also hasa number of discrete keys or buttons 108 that serve as input componentsof the electronic device. However, in other embodiments these keys orbuttons (or any particular number of such keys or buttons) can beimplemented using a touchscreen display or other alternate technologies.

Although FIG. 1 particularly shows the electronic device 100 asincluding the display 106 and keys or buttons 108, these features areonly intended to be examples of components/features on the electronicdevice, and in other embodiments the electronic device need not includeone or more of these features and/or can include other features inaddition to or instead of these features. Further, although FIG. 1 showsthe electronic device 100 to be a wristwatch, the electronic device 100is intended to be representative of a variety of electronic devicesincluding other personal electronic devices and mobile devices such as,for example, personal digital assistants (PDAs), radios, smart phones,tablet computers, or other handheld or portable electronic devices. Inalternate embodiments, the electronic device can be a headset, anarmband, or another form of wearable electronic device, including amedia player (e.g., MP3, MP4, DVD, ebook), a media recorder (e.g.,digital or video camera), a gaming controller, or a remote controller.More examples include a navigation device, a laptop or notebookcomputer, a netbook, a pager, or another type of communication device.Indeed, embodiments of the present disclosure are intended to encompassor be applicable to any of a variety of electronic devices that arecapable of or configured for recognizing spatial gestures.

In addition to the above-described components, the electronic device 100further includes an accelerometer 110 (shown in phantom) that isconfigured to sense movements/accelerations of the electronic device. Byvirtue of the accelerometer 110, the electronic device is able to senseaccelerations along x, y, and z axes as also shown in FIG. 1, which (asdiscussed below) particularly allows the electronic device to sensespatial gestures as described below. In the present embodiment, they-axis is defined to be the vertical axis (up/down relative to thedisplay), the x-axis is defined to be the horizontal axis (left/rightrelative to the display), and the z-axis is defined to be the depth axis(in/out relative to the display). However, it should be appreciated thatthe orientations of these axes are merely exemplary and based on commonconvention. Given the orientations of the axes as shown in FIG. 1 andthe orientation of the electronic device 100 with respect to the forceof gravity 120 with all acceleration due to gravity along the y-axis, araw data point with 3D acceleration can be represented as (x, y, z), anda magnitude of acceleration is defined by:mag=(x,y,x)|=√{square root over (x ² −y ² +z ²)}  (1)Thus, when the electronic device 100 and lower arm 102 are positioned asshown in FIG. 1 in a rest (non-moving) state, the detected values of theaccelerometer along the x, y, and z axes (x, y, z) are (0, 1G, 0), whereG is acceleration due to gravity, and the overall magnitude ofacceleration of the stationary device will be 1G.

Further referring to FIG. 1, it will be appreciated that movement of thelower arm 102 can cause variation in the orientation positions of theelectronic device 100. FIG. 1 includes respective first, second, andthird additional images 170, 180, and 190 of the electronic device 100in respective first, second, and third orientation positions differingfrom the position of the electronic device as shown on the lower arm 102in the first image 101. More particularly, in contrast to theorientation value of the electronic device 100 when positioned on thelower arm 102 as shown in the first image 101, which is an orientationof 0 degrees (with the device being stationary and positioned such thatthe x-axis is horizontal and the y-axis is vertical with the positiveportion of the y-axis pointing vertically upward), the first additionalimage 170 shows the electronic device 100 having an orientation of +90degrees (with (x,y,z)=(1G, 0, 0)), the second additional image 180 showsthe electronic device 100 having an orientation of +/−180 degrees (with(x,y,z)=(0, −1G, 0)), and the third additional image 190 shows theelectronic device having an orientation of −90 degrees (with(x,y,z)=(−1G, 0, 0)), where orientation can be calculated as follows:orientation=a tan 2(x,y)  (2)Further, although not illustrated in FIG. 1, a further characteristic oftilt pertaining to the electronic device 100 is defined by:

$\begin{matrix}{{tilt} = {a\;{\sin\left( \frac{z}{mag} \right)}}} & (3)\end{matrix}$

Although FIG. 1 shows the electronic device 100 in various positionsthat all correspond to a tilt value of zero, it will be appreciated thatthe electronic device can attain different levels of tilt givenappropriate further movement of the lower arm 102 to which theelectronic device is strapped. Geometrically, the electronic device 100shown in FIG. 1 has six faces, with four of those faces being the fouredges (top, bottom, left and right) and the remaining faces being thefront and back surfaces, where the display 106 particularly forms (or isformed as part of) the front surface and the back surface is directlyinterfacing the lower arm. Given this to be the case, it will beappreciated that when the electronic device 100 is positioned on any ofits edges (that is, when the electronic device is positioned in any ofthe manners shown in FIG. 1), the tilt value for the electronic devicewill be zero degrees. Alternatively, if the electronic device 100 ismoved so that the front face of the electronic device 100 points up,then the electronic device will have a tilt value of +90 degrees (andthe acceleration values of the device will be (0,0,1G)), and if theelectronic device is moved so that the front face points down, then theelectronic device will have a tilt value of −90 degrees (and (0,0, −1G)as acceleration values).

As discussed further below, the acceleration input (x,y,z) provided bythe accelerometer 110, along with tilt and orientation values, can beused to assess whether the electronic device 100 is in a valid startingposition for a particular gesture to occur. Additionally in regard tothe definitions of orientation and tilt, it should be appreciated that,even when the device is in motion, these tilts and orientation termsapply. That is, given the positioning of the electronic device 100 onthe lower arm 102 as shown in the first image 101 (but not thepositioning of the electronic device in any of the first, second, orthird additional images 170, 180, and 190), if the wrist in FIG. 1 wasmoving (as long as it was not rotating around the z-axis), visually onewould see and define tilt and orientation to be 0 degrees. That said, ingeneral, the equations for tilt and orientation depend on the devicebeing at rest to allow accurate measurement of tilt and orientationthrough the use of gravity.

FIG. 2 provides a block diagram illustrating example internal components200 of the electronic device 100 of FIG. 1, which in the presentembodiment is a wristwatch having wireless communications capability. Asshown in FIG. 2, the internal components 200 of the electronic device100 include one or more wireless transceivers 202, a processor 204(e.g., a microprocessor, microcomputer, application-specific integratedcircuit, etc.), a memory portion 206, one or more output devices 208,and one or more input devices 210. The internal components 200 canfurther include a component interface 212 to provide a direct connectionto auxiliary components or accessories for additional or enhancedfunctionality. The internal components 200 also include a power supply214, such as a battery, for providing power to the other internalcomponents while enabling the mobile device to be portable. Further, theinternal components 200 additionally include one or more sensors 228.All of the internal components 200 can be coupled to one another, and incommunication with one another, by way of one or more internalcommunication links 232 (e.g., an internal bus).

Further, in the present embodiment of FIG. 2, the wireless transceivers202 particularly include a wireless personal area network (WPAN)transceiver 203 and a wireless local area network (WLAN) transceiver205. More particularly, the WPAN transceiver 203 is configured toconduct short-range wireless communications, using a protocol such asIEEE 802.15 Bluetooth®, IEEE 802.15.4 ZigBee, NFC, RFID, infrared,HomeRF, Home Node B, or others or variants thereof.

By contrast, the Wi-Fi transceiver 205 is a wireless local area network(WLAN) transceiver 205 configured to conduct Wi-Fi communications inaccordance with the IEEE 802.11 (a, b, g, or n) standard with accesspoints. In other embodiments, the Wi-Fi transceiver 205 can instead (orin addition) conduct other types of communications commonly understoodas being encompassed within Wi-Fi communications such as some types ofpeer-to-peer (e.g., Wi-Fi Peer-to-Peer) communications. Further, inother embodiments, the Wi-Fi transceiver 205 can be replaced orsupplemented with one or more other wireless transceivers configured forcellular or non-cellular wireless communications.

Although in the present embodiment the electronic device 100 has two ofthe wireless transceivers 202 (that is, the transceivers 203 and 205),the present disclosure is intended to encompass numerous embodiments inwhich any arbitrary number of wireless transceivers employing anyarbitrary number of communication technologies are present as well aselectronic devices that do not have any wireless communicationscapability. In the present embodiment, by virtue of the use of thewireless transceivers 202, the electronic device 100 is capable ofcommunicating with any of a variety of other devices or systems (notshown) including, for example, other electronic devices including mobiledevices, cell towers, access points, other remote devices, etc.Depending upon the embodiment or circumstance, wireless communicationbetween the electronic device 100 and any arbitrary number of otherdevices or systems can be achieved.

Operation of the wireless transceivers 202 in conjunction with others ofthe internal components 200 of the electronic device 100 can take avariety of forms. For example, operation of the wireless transceivers202 can proceed in a manner in which, upon reception of wirelesssignals, the internal components 200 detect communication signals andthe transceivers 202 demodulate the communication signals to recoverincoming information, such as voice and/or data, transmitted by thewireless signals. After receiving the incoming information from thetransceivers 202, the processor 204 formats the incoming information forthe one or more output devices 208. Likewise, for transmission ofwireless signals, the processor 204 formats outgoing information, whichcan but need not be activated by the input devices 210, and conveys theoutgoing information to one or more of the wireless transceivers 202 formodulation so as to provide modulated communication signals to betransmitted.

Depending upon the embodiment, the input and output devices 208, 210 ofthe internal components 200 can include a variety of visual, audio,and/or mechanical outputs. For example, the output device(s) 208 caninclude one or more visual output devices 216 such as a liquid crystaldisplay and/or light emitting diode indicator, one or more audio outputdevices 218 such as a speaker, alarm, and/or buzzer, and/or one or moremechanical output devices 220 such as a vibrating mechanism. The visualoutput devices 216 among other things can also include a video screensuch as the display screen 106. Likewise, by example, the inputdevice(s) 210 can include one or more visual input devices 222 such asan optical sensor (for example, a camera lens and photosensor), one ormore audio input devices 224 such as the microphone 108 of FIG. 1,and/or one or more mechanical input devices 226 such as a flip sensor,keyboard, keypad, selection button, navigation cluster, touch pad,capacitive sensor, motion sensor, and/or switch. In the electronicdevice 100 of FIG. 1, the keys or buttons 108 are among the mechanicalinput devices 226. Operations that can actuate one or more of the inputdevices 210 can include not only the physical pressing/actuation ofbuttons or other actuators, but can also include, for example, openingor unlocking some portion of the electronic device, moving the device toactuate a motion, moving the device to actuate a location positioningsystem, and operating the device.

As mentioned above, the internal components 200 also can include one ormore of various types of sensors 228. In the present embodiment, thesensors 228 particularly include the accelerometer 110 shown in FIG. 1,which is used for gesture detection as described herein. Although in thepresent embodiment employs the accelerometer 110 for position sensingand motion and gesture detection, in other embodiments other sensor(s)can be used instead of, or in combination with, the accelerometer toperform such sensing and detection. For example, in some alternateembodiments, a gyroscope and/or a barometer can be used instead of, orin addition to, the accelerometer 110. In some embodiments, more thanone of these sensors and/or other sensors are present and used forposition sensing and motion and gesture detection.

Further, in addition to such sensor(s), depending upon the embodiment,the sensors 228 can include any of a variety of other sensor typesincluding, for example, proximity sensors (e.g., a light detectingsensor, an ultrasound transceiver, or an infrared transceiver), touchsensors, altitude sensors, and one or more location circuits/componentsthat can include, for example, a Global Positioning System (GPS)receiver, a triangulation receiver, a tilt sensor, or any otherinformation collecting device that can identify a current location oruser-device interface (carry mode) of the electronic device 100.Although the sensors 228 for the purposes of FIG. 2 are considered to bedistinct from the input devices 210, in other embodiments it is possiblethat one or more of the input devices can also be considered toconstitute one or more of the sensors (and vice-versa). Additionally,although in the present embodiment the input devices 210 are shown to bedistinct from the output devices 208, it should be recognized that insome embodiments one or more devices serve both as input device(s) andoutput device(s). For example, in embodiments in which a touch screendisplay is employed, such a touch screen display can be considered toconstitute both a visual output device and a mechanical input device (bycontrast, the keys or buttons 108 are mechanical input devices).

The memory portion 206 of the internal components 200 can encompass oneor more memory devices of any of a variety of forms (e.g., read-onlymemory, random access memory, static random access memory, dynamicrandom access memory, etc.), and can be used by the processor 204 tostore and retrieve data. In some embodiments, the memory portion 206 canbe integrated with the processor 204 in a single device (e.g., aprocessing device including memory or processor-in-memory (PIM)), albeitsuch a single device will still typically have distinctportions/sections that perform the different processing and memoryfunctions and that can be considered separate devices. In some alternateembodiments, the memory portion 206 of the electronic device 100 can besupplemented or replaced by other memory portion(s) located elsewhereapart from the electronic device and, in such embodiments, theelectronic device can be in communication with or access such othermemory device(s) by way of any of various communications techniques, forexample, wireless communications afforded by the wireless transceivers202, or connections via the component interface 212.

The data that is stored by the memory portion 206 can include, but neednot be limited to, operating systems, programs (applications), andinformational data. Each operating system includes executable code thatcontrols basic functions of the electronic device 100, such asinteraction among the various internal components 200, communicationwith external devices via the wireless transceivers 202 and/or thecomponent interface 212, and storage and retrieval of programs and datato and from the memory portion 206. As for programs, each programincludes executable code that utilizes an operating system to providemore specific functionality, such as file system service and handling ofprotected and unprotected data stored in the memory portion 206. Suchprograms can include, among other things, programming for enabling theelectronic device 100 to perform processes such as calculating position,movements, acceleration, or metrics (such as the correlation and p2pmetrics discussed herein) based upon information from sensors such asthe accelerometer 110, sampling and processing gesture-relatedinformation, and performing processes for gesture recognition such asthe processes described herein. Finally, with respect to informationaldata, this is non-executable code or information that can be referencedand/or manipulated by an operating system or program for performingfunctions of the electronic device 100.

Depending upon the embodiment, an electronic device such as theelectronic device 100 can be configured to recognize a variety ofgestures and gesture types. Turning to FIGS. 3, 4, and 5, three exampletypes of gestures that can be detected by the electronic device 100 inthe present embodiment are illustrated schematically. FIG. 3particularly provides first and second illustrations 300 and 302,respectively, of a user performing a “fist bump” gesture. As is evidentby comparing the second illustration 302 with the first illustration300, the fist bump gesture is one in which the user extends the lowerarm 102 from a retracted position as shown in the first illustration 300outward to a partly-extended position as shown in the secondillustration 302, with the extending of the lower arm (particularly thewrist on which the electronic device 100 is supported) occurringgenerally in the direction represented by an arrow 304 (that is, alongthe x-axis shown in FIG. 1). Thus, the user's primary movement detectedby the electronic device 100 during a fist bump gesture is accelerationalong the x axis due to the arm extension.

Also, as the lower arm 102 is extended, the user's fist and wrist (atwhich the electronic device 100 is particularly supported) rotateapproximately 90 degrees about an arm rotation axis parallel to theindicated direction of the arrow 304 (an axis parallel to the (x) axisof FIG. 1), the arm rotation axis generally extending within and alongthe length of the lower arm. Thus, the gravity component of accelerationdetected by the accelerometer 110 of the electronic device 100 shiftsfrom acting along the −y axis to acting along the +z axis due to thewrist rotation. Further, although the electronic device 100 will startwith a tilt=0 and an orientation=+/−180 (with the definitions of tiltand orientation being as discussed above), the electronic device willultimately have a tilt of 90 degrees due to the change of axis forgravity. Correspondingly, detected acceleration goes from (0, −1G, 0) to(0, 0, 1G). That is, at the start of the fist bump gesture, the positionof the electronic device 100 can be substantially that shown in thesecond additional image 180 of FIG. 1, where the electronic device has atilt value of 0 degrees and an orientation of +/−180 degrees with thebottom edge of the device facing upward. By contrast, at the end of thegesture, the position of the electronic device 100 will be one in whichthe front surface corresponding to the display screen 106 is facing up,where the tilt value has become 90 degrees. Additionally, to achieve the“bump” effect, the fist bump gesture ends when the user abruptly ceasesextending the lower arm 102 outward, when the lower arm has reached theextended position shown in the second illustration 302. The fist bumpgesture therefore entails a large change in acceleration due to stopping(even larger for actual bump with something).

As mentioned previously, the lower arm 102 can be either the left arm orthe right arm of the user. Thus, there will be positive +x axisacceleration when the lower arm 102 on which the electronic device 100is worn is the left arm (the left wrist), and there will be negative −xaxis acceleration when the lower arm is the right arm (right wrist).Although following the “bump”, typically the lower arm 102 is thenretracted by the user, this aspect of movement is not a significantaspect of the fist bump gesture; that is, the end point of the fist pumpgesture can be considered to occur substantially immediately after thebump has occurred.

By comparison, FIG. 4 provides first, second, and third illustrations400, 402, and 404, respectively, of a user performing a “handshake”gesture. As shown, the handshake gesture first involves the userextending the lower arm 102 outward as shown in the first illustration400 by an arrow 406, then rotating the lower arm 102 downward about anelbow 403 as shown in the second illustration 402 by an arrow 408, andfinally rotating the lower arm upward also about the elbow as shown inthe third illustration 404 by an arrow 410. It should be appreciatedthat the upward and downward movements can occur in the reverse order,and still be recognized as a handshake. It is assumed that an electronicdevice 100 worn on the right wrist will recognize a handshake movementin keeping with convention. Of course, an electronic device 100 worn onthe left wrist will also recognize a handshake movement (in fact, thedevice actually experiences the same acceleration regardless of thewrist).

Further, FIG. 5 provides first, second, and third illustrations 500,502, and 504, respectively, of a “handwave” gesture. As shown, thehandwave gesture first entails the user extending the user's entire armincluding the lower arm 102 outward, with the lower arm extendinggenerally vertically upward (e.g., against the force of gravity) fromthe elbow 403 of the arm. After the lower arm 102 is in this position asshown in the first illustration 500, the handwave gesture then involvesrotating the lower arm 102 sideways about the elbow 403, as representedby an arrow 506, outward away from the head of the user. As a result ofthis rotation, the lower arm 102 takes on the position shown in thesecond illustration 502. Upon reaching this position, the user switchesthe direction of rotation of the lower arm 102, to be in the oppositedirection as represented by an arrow 508. Ultimately the lower arm 102returns to a vertically-extending position as shown in the thirdillustration 504. It should be appreciated that the side-to-sidemovement of the lower arm 102 can occur in directions opposite to thoseshown, such that the lower arm initially proceeds inward toward (ratherthan away from) the head of the user, and then returns outward. Also,there can be a wider range of movement (that encompasses both movementtoward the head from the vertical position shown in the firstillustration 500 and movement away from the head from the verticalposition shown in the first illustration), or a repeated waving motionrather than simply a single waving motion. As mentioned previously,either wrist (or hand) may support the electronic device 100.

It will be appreciated that each of the different types of gesturesdescribed above in relation to FIGS. 3, 4, and 5 have characteristicmovement patterns that remain the same or substantially (or largely) thesame each time a specific instance of each given type of gesture isperformed. Nevertheless, the exact movement associated with a given typeof gesture can and typically does vary with each instance in which thegiven type of gesture is performed. That being the case, in the presentembodiment such sensed movement (and signals indicative thereof) isanalyzed/processed by the electronic device 100 in a manner involving acomparison with at least one gesture template that enables detection ofgestures as instances of a gesture type notwithstanding variations inthe movements associated with each given gesture instance and thedifferences in data sensed based on whether a left or right arm issupporting the electronic device 100. That is, the analysis/processingallows for gesture recognition to be performed in a manner thattolerates some variations in the movements of different gestures thatare all of the same gesture type and that should be recognized as such.

More particularly, the analysis/processing performed by the electronicdevice 100 (and particularly the processor 204 thereof) in the presentembodiment entails several aspects represented by a state diagram 1400shown in FIG. 14 and a flow chart 1500 shown in FIG. 15, which arediscussed in detail below. In general, this analysis/processing involvesseveral steps. First, prior to performing analysis/processing ofmovement data received with respect to any given gesture instance thatis to be detected, a gesture template or snippet is determined andprovided to the electronic device 100 (or developed through operation ofthe electronic device). The gesture template serves as a representationof “typical” movement associated with the type of gesture that is to bedetected. In the present embodiment, such a gesture template isdeveloped based upon sample movement data associated with a given typeof gesture. That is, gesture templates/snippets are createdexperimentally, prior to actual gesture recognition. In somecircumstances, the gesture templates/snippets can be developed by theuser of the electronic device 100 but, in other circumstances, thegesture templates/snippets can be software loaded onto the electronicdevice at the time of manufacture or downloaded at some time during thelifetime of the electronic device. Additionally, multiple gesturetemplates may be developed for a single gesture type; for example, afist bump gesture may have four gesture templates.

For example, in regard to a fist bump gesture type as discussed withrespect to FIG. 3, FIG. 6 shows example sample movement data(particularly acceleration data) as provided by the accelerometer 110recorded over a period of time during which a user wearing an electronicdevice 100 on the dorsal side of a left wrist made fist bump motions,with samples taken at a rate of 25 Hz. More particularly, FIG. 6 showsnine series of sample movement data (shown as nine different curveslabeled respectively Series 1, Series 2, Series 3, Series 4, Series 5,Series 6, Series 7, Series 8, and Series 9) corresponding to ninedifferent sample gesture movements that were obtained via theaccelerometer 110. Referring further to FIG. 7, based at least in partupon the sample movement data of FIG. 6, a fist bump gesture pattern isdeveloped, which in the present embodiment is shown as including threedifferent components (shown as three different curves), namely, anx-acceleration component, a y-acceleration component, and az-acceleration component, which are indicative of “typical”accelerations that would be experienced by the accelerometer 110 alongthe x, y, and z axes shown in FIG. 1 during a typical instance of a fistbump gesture. Note how the sample movement data of FIG. 6 is generalizedas the y-acceleration component (curve) of FIG. 7.

Additionally, referring further to FIG. 8, an example fist bump gesturetemplate or snippet is developed based upon the fist bump gesturepattern of FIG. 7. The gesture template of FIG. 8 again hasx-acceleration, y-acceleration, and z-acceleration components, and thesecomponent curves are identical to those of FIG. 7, except insofar aslatter portions of the component curves of FIG. 7 have been removedbecause the fist bump gesture is understood to be complete upon the“bump” occurring (when the lower arm 102 ceases being extended, as shownin the second illustration 302 of FIG. 3), and any sensed movementoccurring after that time is not relevant to determination of fist bumpgestures.

Although FIGS. 6, 7, and 8 relate particularly to determining onegesture template (snippet) for a fist bump type of gesture, such gesturetemplates (snippets) are equally determinable in relation to differentfist bump configurations as well as other gesture types such as thehandshake gesture type of FIG. 4 and the handwave gesture type of FIG.5, based upon sample movement data obtained in relation to those gesturetypes. Thus, referring additionally to FIGS. 9 and 10, FIG. 9 shows agraph 900 of an example handshake gesture template havingx-acceleration, y-acceleration, and z-acceleration component curves, andFIG. 10 shows a graph 1000 of an example handwave gesture templatehaving x-acceleration, y-acceleration, and z-acceleration componentcurves. Note that each gesture type (e.g., fist bump, handshake,handwave) may have multiple templates based on whether the watch is wornon the right or left wrist, whether the watch faces the dorsal or palmarside, and other variables. If the electronic device determines where itis being worn, processing for irrelevant templates need not occur.

Mathematically, in the present embodiment, a gesture template (orsnippet) S made up of L samples is expressed by the sequence:S={s ₁ ,s ₂ , . . . s _(L)}  (4)Further, the snippet's mean and variance respectively are given byequations (5) and (6), respectively:

$\begin{matrix}{\mu_{s} = {\frac{1}{L}{\sum\limits_{i = 1}^{L}s_{i}}}} & (5) \\{\sigma_{s}^{2} = {\frac{1}{L}{\sum\limits_{i = 1}^{L}\left( {s_{i} - \mu_{s}} \right)^{2}}}} & (6)\end{matrix}$The mean adjustment of the snippet is important for pattern matching.For example, it prevents an all-positive snippet from having a highcorrelation with an all-positive window with a different pattern. Itshould be understood that the standard deviation of the snippet, σ_(s),is equal to the square root of the variance of the snippet, σ_(s) ², ascalculated in accordance with equation (6) above.

Assuming that a gesture template (or snippet) has been developed by theelectronic device 100 or is otherwise made available to the electronicdevice, then additional analysis/processing can be performed by theelectronic device for the purpose of recognizing specific gestureinstances that occur and are sensed by the electronic device by way ofthe accelerometer 110 (and/or other sensing device(s)). In general, theanalysis/processing performed in order to detect and recognize a givengesture instance entails comparing data sensed by the accelerometer 110(and/or other sensing device(s)) during a given time period, with thegesture templates (or snippets) obtained in regard to that type ofgesture. That said, the particular analysis/processing can varydepending upon the embodiment, and FIG. 14 and FIG. 15 arerepresentative of example processing states and steps/operations thatoccur in one example embodiment.

More particularly, in the present embodiment, the analysis/processingperformed by the electronic device 100 (and processor 204 thereof) forgesture recognition involves particular mathematical relationships.First, as already discussed above, to perform gesture recognition theelectronic device 100 detects movement and collects movement data. Tofacilitate comparison of such detected movement data with a gesturetemplate (snippet), it is presumed that the real-time collected samplesof movement data fill a window W with the same length as the snippet(that is, with L samples), represented by equation (7):W={w ₁ ,w ₂ , . . . ,w _(L)}  (7)Given such a window of detected movement data, it is then possible tocalculate the window's modified variance and modified covariance withthe snippet. In the present embodiment, the modified variance value andmodified covariance value are respectively determined depending on thesnippet's mean (not the window's mean) and are given respectively byequations (8) and (9), respectively, below:

$\begin{matrix}{\mspace{79mu}{{\hat{\sigma}}_{w}^{2} = {\frac{1}{L}{\sum\limits_{i = 1}^{L}\left( {w_{i} - \mu_{s}} \right)^{2}}}}} & (8) \\{\mspace{79mu}{{\hat{\sigma}}_{s,w} = {\frac{1}{L}{\sum\limits_{i = 1}^{L}{\left( {s_{i} - \mu_{s}} \right)\left( {w_{i} - \mu_{s}} \right)}}}}} & (9)\end{matrix}$It should be understood that the modified standard deviation of thewindow, {circumflex over (σ)}_(w), can be defined as being equal to thesquare root of the modified variance of the window, {circumflex over(σ)}_(w) ², as calculated in accordance with equation (8) above.

Additionally, after the modified variance, modified covariance, andmodified standard deviation values of the window have been determined inaddition to the standard deviation of the snippet, a correlation metric(M_(corr)) can be determined, with the correlation metric being anindication of how well the detected gesture movement data matches thegesture template (snippet) and thus an indication of the likelihood thata gesture of the type corresponding to the gesture template (snippet)has occurred. In the present embodiment, the correlation metric(M_(corr) or {circumflex over (ρ)}_(s,w)) is a modified Pearsoncorrelation coefficient and is given by:

$\begin{matrix}{M_{corr} = {{\hat{\rho}}_{s,w} = \frac{{\hat{\sigma}}_{s,w}}{\sigma_{s}{\hat{\sigma}}_{w}}}} & (10)\end{matrix}$As with the standard (common) Pearson correlation coefficient (discussedfurther below), the denominator of the modified Pearson correlationmetric M_(corr) normalizes the metric to be between −1.0 and 1.0, whichcan be scaled to produce a score or estimated likelihood as to whetherthe detected gesture data (by comparison with the snippet) is indicativeof the occurrence of a gesture of the given type corresponding to thesnippet.

Although the correlation metric M_(corr) is a useful measure of whetherdetected movement is in fact a gesture of a given type corresponding tothe gesture template (snippet), other metric(s) can also be determinedand utilized in the gesture recognition process. More particularly, inthe present embodiment, the analysis/processing performed by theelectronic device 100 (and processor 204 thereof) further involvesdetermining and utilizing a peak-to-peak metric (M_(p2p)). The samewindow with the same samples used for the correlation metric (M_(corr)),namely, that represented by equation (7) above, is used for thepeak-to-peak metric (M_(p2p)). Using the samples of this window, amaximum sample of the window W_(max) and a minimum sample of the windowW_(min) can be defined as follows:W _(max)=max{w ₁ ,w ₂ , . . . w _(L)}  (11)W _(min)=min{w ₁ ,W ₂ , . . . w _(L)}  (12)Further, based upon these quantities, the peak-to-peak metric (M_(p2p))is further defined as:M _(p2p) =W _(p2p) =W _(max) −W _(min)  (13)

Given the above, in the present embodiment the full set of values andmetrics available for gesture recognition for the limited case of usingjust the single input provided by the accelerometer 110 (which as athree-dimensional/3D accelerometer can thus actually be considered asproviding three different inputs corresponding to the x-axis, y-axis,and z-axis of FIG. 1) include the samples x,y,z, position informationbased upon those samples, calculated tilt and orientation, correlationmetrics, and peak-to-peak metrics. That is, the 3D accelerometer sensorinputs (raw input values x,y,z) at the electronic device 100 areconsidered with respect to each of alignment of the electronic devicewith the Cartesian coordinate system (x, y, and z axes), tilt, andorientation as defined above, and also are used as the actual motionassociated with the gesture based upon which the correlation andpeak-to-peak metrics are calculated.

Further in the present embodiment, these various values/metrics are usedfor different evaluative purposes. More particularly, the samples x,y,zparticularly can be used to assess position validity for the start of agesture, and the calculated tilt and orientation also can be used toassess position validity for the beginning of a gesture. For example, ifit is determined based upon the tilt and orientation calculationspertaining to the electronic device 100 that the lower arm 102 isextended directly vertically rather than substantially horizontally withrespect to gravity, then it can be immediately determined that anydetected movement could not pertain to a fist bump gesture (because bydefinition the fist bump gesture presumes starting with ahorizontally-extending lower arm). By comparison, the correlationmetrics for x,y,z and also the peak-to-peak metrics for x,y,z can beused for gesture detection, insofar as those metrics allow for acomparison between movement data and the gesture template(s) for one ormore types of gestures.

Notwithstanding the above, in alternate embodiments other metrics (andother values or data) can be used for gesture recognition and/or todetermine whether a given data set is potentially that of a definedgesture. Indeed, the present disclosure envisions that numerous otherformulas and mathematical relations can be used in various embodimentsor circumstances to determine or provide various metrics of interestrelating to position, tilt, orientation, correlation, and peak-to-peakvalues for particular gesture types as well as other types of metrics,instead of or in addition to those discussed above. For example, in someother embodiments, additional local frame metrics (samples, p2p, andcorrelation) can be introduced based on other sensor inputs (e.g., Eulerangles and angular velocities) for gesture recognition.

Further for example, although equation (10) above provides an examplemathematical definition of a correlation metric (M_(corr)), thisparticular correlation metric can be replaced by others. The correlationmetric of equation (10) was intentionally designed to use just thesnippet's mean (that is, the correlation metric of equation (10) isbased upon window's modified variance and modified covariance, each ofwhich only depends on the snippet's mean and not on the window's mean),due to the resulting properties of this metric and, as such, thecorrelation metric established by equation (10) can be considered to bea modified Pearson correlation coefficient. Nevertheless, a typicalcorrelation statistic between two sequences (e.g., between a windowsequence of samples and a snippet) would depend on both sequences'means. In this regard, in alternate embodiments, a standard Pearsonmetric based on the Pearson correlation coefficient can be introducedand utilized, for example, in combination with the correlation metric ofequation (10).

In the present context relating to snippets and windows of data samples,such a standard Pearson correlation coefficient can be defined asfollows. First, given a snippet S as defined by equation (4) above, thesnippet's mean and variance are respectively given by equations (5) and(6), already discussed above. Further, the mean and variance of a windowW defined according to equation (7) above are respectively given byequations (14) and (15), respectively, below:

$\begin{matrix}{\mu_{w} = {\frac{1}{L}{\sum\limits_{i = 1}^{L}w_{i}}}} & (14) \\{\sigma_{w}^{2} = {\frac{1}{L}{\sum\limits_{i = 1}^{L}\left( {w_{i} - \mu_{w}} \right)^{2}}}} & (15)\end{matrix}$It should be understood that the standard deviation of the window,σ_(w), can be defined as being equal to the square root of the varianceof the window, σ_(w) ², as calculated in accordance with equation (15)above.

Given the above, the covariance between the snippet and window dependson both the snippet's mean and the window's mean and is defined byequation (16) as follows:

$\begin{matrix}{\mspace{79mu}{\sigma_{s,w} = {\frac{1}{L}{\sum\limits_{i = 1}^{L}{\left( {s_{i} - \mu_{s}} \right)\left( {w_{i} - \mu_{w}} \right)}}}}} & (16)\end{matrix}$Finally, in view of the above, a standard Pearson metric constitutingthe Pearson correlation coefficient (M_(pearson) or ρ_(s,w)) is given byequation (17):

$\begin{matrix}{\mspace{76mu}{M_{Pearson} = {\rho_{s,w} = \frac{\sigma_{s,w}}{\sigma_{s}\sigma_{w}}}}} & (17)\end{matrix}$

Although various metrics can be used depending upon the embodiment, itshould be noted that the correlation metric established by equation(10), which again can be considered a modified Pearson correlationcoefficient, differs from the “standard” Pearson correlation metricestablished by equation (17). FIGS. 11, 12, and 13 are illustrative ofcertain example gesture templates S and gesture data windows W inrelation to which correlation metrics can be calculated, and moreparticularly for which certain differences in the calculated correlationmetrics resulting from use of the modified Pearson correlationcoefficient and the standard Pearson correlation coefficient arepronounced. FIGS. 11, 12, and 13 thus illustrate certain advantages ofusing the modified Pearson correlation coefficient of equation (10)instead of the standard Pearson correlation metric of equation (17) asdiscussed further below.

More particularly, FIG. 11 shows an example of a gesture template thatis a linear curve 1102 established by five samples 1104, andadditionally shows as examples first, second, and third gesture datacurves 1106, 1108, and 1110, respectively, which are established bythree different sets of example gesture data (three different windowsW). It will be noted that the second gesture data curve 1108 happens tooverlap exactly the linear curve 1102. In regards to these curves, thestandard Pearson correlation metric M_(Pearson) would take on a value of1.0 in relation to each of the first, second, and third gesture datacurves 1106, 1108, and 1110 (with each being compared to the gesturetemplate represented by the linear curve 1102), because the slope ofeach of these gesture data curves is identical to that of the linearcurve 1102. In contrast, the modified Pearson correlation metricM_(corr) would only take on a value of 1.0 with respect to the secondgesture data curve 1108, and would take on a value of 0.3 with respectto each of the first and third gesture data curves 1106 and 1110, due toan offset 1112 existing between the linear curve 1102 and each of thosefirst and third gesture data curves.

Given this to be the case, it can be appreciated that use of themodified Pearson correlation metric is advantageous vis-à-vis use of thestandard Pearson correlation metric, insofar as the modified Pearsoncorrelation metric allows for an offset to be taken into account indetermining whether the gesture data sufficiently corresponds to thegesture template so as to indicate that a gesture has occurred (bycontrast, the standard Pearson correlation metric does not indicate suchoffsets). It should be noted further in regards to the data/curvesillustrated in FIG. 11 that the peak-to-peak metrics for each of thegesture data curves 1106, 1108, and 1110 are identical and thus, in thisexample, the peak-to-peak metrics cannot provide help in discerningbetween the different gesture data curves.

Also it should be noted that, even if FIG. 11 was modified so that eachof the gesture data curves 1106, 1108, and 1110 had slopes that were theopposite of what are shown (that is, negative slopes, with each of thecurves decreasing in value as the linear curve 1102 increases in value),the correlation metrics for those gesture data curves would be the sameas discussed above, except insofar as each of those correlation metricswould have a negative value. That is, the modified Pearson correlationmetric for the gesture data curve 1108 would be −1.0 if it had theopposite slope to that shown in FIG. 11 (such that the curve passedthrough the middle one of the sample data points 1104 as it declined),and the data curves 1106 and 1110 would each have a modified Pearsoncorrelation metric of −0.3. By contrast, the standard Pearsoncorrelation metric for all three of the curves 1106, 1108, and 1110modified as discussed above would be −1.0. Thus, the modified Pearsoncorrelation metric would convey the departure of the various gesturedata curves, in terms of the magnitude of their slopes (with decreasingmagnitude), but the standard Pearson correlation metric would not conveythis information.

Further, FIG. 12 shows another example gesture template that is a linearcurve 1202 formed by five samples 1204 (the linear curve 1202 andsamples 1204 can be, but need not be, the same as the linear curve 1102and samples 1104 of FIG. 11). Further, FIG. 12 shows as examples first,second, and third gesture data curves 1206, 1208, and 1210,respectively, which are established by three different sets of examplegesture data (three different windows W). In this case, as shown, eachof the gesture data curves 1206, 1208, and 1210 has an initial datapoint that is identical to the first of the samples 1204, such that eachof the gesture data curves begins at the same location as the linearcurve 1202. However, each of the gesture data curves 1206, 1208, and1210 progressively has a larger slope than that of the linear curve 1202and its predecessors, with the third gesture data curve 1210 having thegreatest slope of the three gesture data curves, and the first gesturedata curve 1206 having the least slope of the three gesture data curves(but a slope still greater than that of the linear curve 1202).

Given the particular data/curves illustrated by FIG. 12, althoughpeak-to-peak metrics will vary depending upon which of the gesture datacurves 1206, 1208, and 1210 is compared to the linear curve 1202, thestandard Pearson correlation metric will be the same value of 1.0 whencalculated in relation to each of these three data curves. By contrast,the modified Pearson correlation metric will provide different values,namely, a value of 0.8 with respect to the first gesture data curve1206, a value of 0.7 with respect to the second gesture data curve 1208,and a value of 0.6 with respect to the third gesture data curve 1210.Given this to be the case, it can be appreciated that use of themodified Pearson correlation metric is advantageous relative to use ofthe standard Pearson correlation metric, insofar as (generally speaking)as the pattern associated with a gesture data curve expands away fromthe gesture template (e.g., away from the linear curve 1204), themodified Pearson correlation metric conveys this departure by decreasingbut, in contrast, the standard Pearson correlation metric is constantand fails to indicate these differences.

Additionally in regard to FIG. 12, it should further be appreciatedthat, alternatively, the curve 1210 can instead be considered a gesturetemplate curve and each of the curves 1204, 1206, and 1208 can beconsidered the gesture data curves corresponding to different windows Wof data. Given this interpretation, peak-to-peak metrics again will varyfor the different gesture data curves (and can help discern betweenthose patterns). However, the standard Pearson correlation metric againis 1.0 with respect to each of the curves 1204, 1206, and 1208, but themodified Pearson correlation metrics for the curves 1208, 1206, and 1204respectively are 0.6, 0.2, and 0.1, respectively. Again, with FIG. 12interpreted in this manner, this demonstrates that the modified Pearsoncorrelation metric conveys the departure (or compression) of the gesturecurves 1208, 1206, and 1204 as those curves progressively take onpositions farther below the curve 1210 constituting the gesture templatein this example, but the standard Pearson correlation metric fails toconvey this information.

Further, FIG. 13 shows again an example gesture template that is alinear curve 1302 formed by five samples 1304 (the linear curve 1302 andsamples 1304 can be, but need not be, the same as the linear curves1102, 1202 and samples 1104, 1204 of FIGS. 11 and 12). Further, FIG. 13shows as examples first, second, and third gesture data curves 1306,1308, and 1310, respectively, which are established by three differentsets of example gesture data (three different windows W). In this case,as shown, each of the gesture data curves 1306, 1308, and 1310 passesthrough a middle one of the samples 1304, but has a slope that isgreater than or less than that of the linear curve 1302, such that eachof the gesture data curves either begins below the linear curve 1302 andends up above the linear curve (curve 1310) or vice-versa (curves 1306and 1308). The third gesture data curve 1310 has the greatest slope ofthe three gesture data curves, the first gesture data curve 1306 has theleast slope of the three gesture data curves, and the slopes of thelinear curve 1302 and the curve 1308 are in between, with the slope ofthe curve 1302 larger than that of the curve 1308. Generally speaking,the gesture data curves 1306, 1308, and 1310 are patterns that arescaled templates that are all offset to have the same mean.

With respect to the particular data/curves illustrated by FIG. 13, incontrast to the data/curves illustrated by FIG. 12, both the standardPearson correlation metric and the modified Pearson correlation metricwill take on the same value of 1.0 when calculated in relation to eachof these three data curves. Thus, the modified Pearson correlationmetric is not particularly advantageous relative to the standard Pearsoncorrelation metric in allowing for distinctions to be made among thegesture data curves 1306, 1308, and 1310. Nevertheless, peak-to-peakmetrics will vary depending upon which of the gesture data curves 1306,1308, and 1310 is compared to the linear curve 1302, and thus thepeak-to-peak metrics can still be used to distinguish among the curves1306, 1308, and 1310.

Again referring particularly to FIGS. 14 and 15, in the presentembodiment the electronic device 100 (and particularly the processor204) operates in accordance with a state diagram (or state machine) 1400and in accordance with a flow chart 1500 as it operates to recognizegestures, after the electronic device has been provided with gesturetemplate(s) or sampled data suitable for allowing the electronic deviceitself to generate such gesture template(s). That is, upon the processrepresented by the flow chart 1500 starting at a step 1501, at a step1502 the electronic device 100 obtains one or more appropriate gesturetemplate(s) and then is able to operate in accordance with the statediagram 1400 of FIG. 14 as well as in accordance with the remainingsteps of the flow chart 1500. Operation in accordance with the statemachine particularly not only allows for control over algorithmicoperations, but also allows for reduction in the algorithmic operations.

Particularly with respect to the state diagram 1400, it will be notedthat the state diagram includes three states, namely, a “Don't CollectData” state 1402, a “Collect Data” state 1404, and an “Assess Data”state 1406. The Don't Collect Data state is one in which the electronicdevice 100 clears collected data and checks raw data to determine ifposition is good. The Collect Data state 1404 is one in which theelectronic device 100 checks raw data to determine if position is goodand collects sample(s) in a sliding window. The sliding window typicallyis a window W of samples where, over time, earliest-received ones of thesamples are discarded and new samples are added to the window, in afirst-in, first-out (FIFO) manner. The Assess Data state 1406 is one inwhich the electronic device 100 produces and checks correlation and p2pmetrics to determine if a gesture has been detected or “found”.

Further as shown, the electronic device 100 remains within theparticular states 1402, 1404, and 1406, or switches between the states,based upon the status of three conditions, namely, a “good” condition, a“filled” condition, and a “found” condition. The good condition is acondition signifying that the current detected position of theelectronic device 100 (and thus the position of the wrist of the lowerarm 102) is either suitable for a given gesture type to occur or, evenif currently unsuitable for the given gesture type to occur, has onlybeen unsuitable (“bad”) for a short time. Whether this condition is metcan be determined based upon information concerning the position, tilt,and orientation of the electronic device 100 obtained from sampled data.The filled condition is a condition signifying that the sliding windowof detected data has been filled with sufficient samples so as to allowcorrelation and p2p metrics to be calculated, and is determined basedupon whether sufficient data has been sampled by way of theaccelerometer 110 (and/or other sensing devices). The found condition isa condition signifying that a gesture of a given type has in fact beenrecognized (e.g., recently recognized or “found”) based upon thecomparison of the sampled gesture data with a gesture template (orsnippet). Whether this condition is met is determined based upon thecorrelation and p2p metrics, and satisfaction of this condition is whatfinally constitutes recognition of a gesture.

In regard to the sampling of data during gesture detection, it should beparticularly noted that, in the present embodiment, to be fully filledthe window W has the same number of samples (in equation (7), “L”samples) as are used to generate the gesture template or snippet (inequation (4), also “L” samples). Also, it should be noted that thecollection of samples occurring during the state 1404 occurs on anongoing basis while the electronic device 100 is in that state, and theelectronic device receives the samples typically on an ongoing basis ata rate equal to that used in determining the gesture template (e.g., ata pace of 25 Hz corresponding to the sample rate for the data used togenerate the graphs of FIGS. 6, 7, and 8). After a window has L samples,as further samples are obtained, earlier samples are discarded from thewindow (with the samples being discarded on a FIFO basis). Although itis the case in the present embodiment that the window W and snippet Shave the same number of samples (L samples each, in this example), inother embodiments this need not always be the case.

As further shown by FIG. 14, in the present embodiment the electronicdevice 100 switches between the states 1402, 1404, and 1406 dependingupon which of the conditions are true or untrue. More particularly, whenthe electronic device 100 is in the Don't Collect Data state 1402, theelectronic device remains in that state so long as either the goodcondition is not met (!good) or (∥) the found condition is considered tobe met (found). This is appropriate because, if the good condition isnot met, then that signifies that the lower arm 102 is positioned insuch a manner that it would not be possible for a gesture (or at leastnot a gesture in accordance with a gesture type of interest) to occur,and also because presumably only one gesture will be occurring at anygiven time and so, if a gesture is currently found, then it is not yetan appropriate time for trying to detect a new gesture.

Although the electronic device 100 remains in the Don't Collect Datastate 1402 in the above-described circumstances, when both the goodcondition is met and (&&) the found condition is considered to be notmet (good && !found), then the electronic device switches to the CollectData state 1404. When in the Collect Data state 1404, the electronicdevice 100 remains in that state either until such time as the goodcondition is no longer met (!good), in which case the electronic devicereturns to the Don't Collect Data state 1402, or until both the goodcondition and the filled condition are met (good && filled). Further, solong as the electronic device 100 is in the Collect Data state 1404 andthe good condition is met but the filled condition is not yet met, thussignifying that it is possible that a gesture may occur but sufficientdata samples have not yet been obtained to perform gesture recognition(good && !filled), the electronic device remains in the Collect Datastate 1404 and continues to obtain additional data samples to form thewindow W of samples.

As shown, the electronic device 100 further advances from the CollectData state 1404 to the Assess Data state 1406 when the good condition ismet and the filled condition is met (good && filled), signifying that itis possible that a gesture of interest is occurring, and that sufficientsampled data has been obtained to form a judgment that an instance of agesture type of interest has occurred. It is at the Assess Data state1406 that the correlation and p2p metrics are calculated based upon theparticular window W of sampled data obtained during the state 1404.

Because it is often if not typically the case that the correlation andp2p metrics calculated based upon a given window W of sampled data willnot be indicative of a gesture having occurred, the electronic device100 will often, when in the Assess Data state 1406, determine that thefound condition is not met and then immediately return to the CollectData state 1404. Upon returning to the Collect Data state 1404, anadditional data sample (or possibly multiple samples) can be taken toupdate the data sample(s) in the window W and, upon this occurring, theelectronic device 100 then again returns to the Assess Data state 1406for assessment of the new window of data samples (assuming that the goodcondition is still met). Thus, the electronic device 100 can cyclerepeatedly back and forth between the Collect Data and Assess datastates 1404, 1406, so as to repeatedly obtain and assess new gesturesample data, so long as the good condition remains met. If theoccurrence of a gesture has been recognized (found) during the AssessData state 1406, the electronic device 100 returns to the Don't CollectData state 1402.

Referring again to FIG. 15, as already noted above, the process ofoperation of the electronic device 100 as represented by the flowchart1500, upon starting at the step 1501 and receiving or obtaining gesturetemplate/snippet information for gesture types of interest at the step1502, then advances to analyze/process the data samples it obtains fromthe accelerometer 110 (or other sensing devices) in relation to thegesture template/snippet information to perform gesture recognition.Such processing/analysis is performed in accordance with the steps1504-1532 shown in FIG. 15. It should be appreciated that the performingof these steps largely corresponds to the manner of operationrepresented by the state diagram 1400 of FIG. 14, albeit the processingis shown in a different manner.

As shown, upon completing the step 1502, the electronic device 100receives 1504 data samples (x, y, z) by way of the accelerometer 110 (orother sensing device(s)), and then subsequently the electronic device100 (or processor 204 thereof) assesses 1506 the data samples for thepurpose of determining whether the currently-sensed data samples canpotentially be indicative of a valid beginning of a gesture. Again, ifthe position of the electronic device 100 as represented by the samplesindicate that the electronic device (or wrist of the lower arm 102 onwhich it is supported) is in a position that is inconsistent with agesture being performed, then at a step 1508 it is determined that thesamples are invalid, that is, a gesture is not possible as indicated bythose particular samples, and thus the process advances from the step1508 to a step 1510, at which all of the currently-held data samples ofthe window W are eliminated from the memory of the electronic device 100(to be clear, depending upon the embodiment or circumstance, any subsetof the currently-held data samples can be considered in relation to thesteps 1506, 1508 and/or eliminated at the step 1510). Upon performing ofthe step 1510, the process can be considered to end at a step 1512 or,alternatively as shown, the process can begin anew by proceeding to astep 1514 at which new data samples are obtained, after which theprocess returns to the step 1506.

Further with respect to FIG. 15, if at the step 1508 it is insteaddetermined that the samples are valid, then the process instead advancesto a step 1516, at which the electronic device 100 calculates tilt andorientation of the electronic device 100 (and thus the wrist of thelower arm 102 on which it is supported) to further determine whether itis possible that the data samples are indicative of a valid gestureoccurring. Any or all (in the present embodiment, all) of the receivedsamples of the window W (e.g., L samples), are used for this purpose atthe step 1516. Then, if it is determined at a step 1518 that thecalculated tilt and/or orientation is/are inconsistent with a validgesture, then the process again return to the step 1510 and ultimatelythe step 1512 or 1514 (again, as with the steps 1506, 1508, and 1510,depending upon the embodiment or circumstance, any subset of thecurrently-held data samples can be considered in relation to the steps1516, 1518 and/or eliminated at the step 1510). Alternatively, if at thestep 1518 it is determined that the tilt and orientation values thathave been calculated are consistent with a gesture of interestoccurring, then the process instead proceeds from the step 1518 to astep 1520.

Step 1520 is the first of several steps performed for the purpose ofdetermining whether received data samples should be recognized in factas a gesture instance of a gesture type of interest. As shown, at thestep 1520, the electronic device 100 first evaluates (that is,calculates and evaluates) the peak-to-peak sample data values, that is,the peak-to-peak metric (M_(p2p)). If it is determined at a step 1522that the determined peak-to-peak metric is indicative of the occurrenceof a gesture of a gesture type of interest, then the process advances toa step 1526, at which additionally the electronic device 100 furthercalculates and evaluates the correlation metrics for the purpose ofgesture detection. As already discussed, the correlation metric that isparticularly determined in the present embodiment is that shown inequation (10) above. That is, the correlation metric (M_(corr)) iscalculated with respect to all of the L sample data values (that is, thesamples 1-L).

If as a result of the evaluation of the step 1526 a gesture is notdetected, then the process proceeds to a step 1524, which is also thestep that is arrived at if at step 1522 it is determined that there isno potential for a gesture. Upon reaching the step 1524, the processadvances to the next window W. That is, one (or potentially more thanone) of the data samples within the window W is eliminated and theelectronic device 100 receives a new data sample (or samples) from theaccelerometer 110 (or other sensing device(s)) to update the window W.Thus the step 1524 is similar (if not identical) to the step 1514 inthat both steps involve discarding old sample data and adding new sampledata. It should be noted further in this regard that, although in someembodiments only a single data sample is eliminated (e.g., during FIFOoperation, with values in the window being contiguous samples), in otherembodiments more than one data sample can be eliminated. To be clear,although in some embodiments or circumstances it can be appropriate toconsider a “data sample” as referring to only a single portion of datacorresponding to only single input (e.g., x input, y input, or z input,but not two or more of these in combination), with respect to thepresent discussion concerning the elimination of a single data samplefrom the window during FIFO operation, each data sample should beunderstood to include an array of three portions of data correspondingto multiple (e.g., three) inputs (e.g., x, y and z). Thus, in thepresent discussion, elimination of a data sample from the window refersto elimination of all of the x, y, and z values that were obtained atthe same time.

After completion of the step 1524, the process returns to the step 1506and assessment of the samples at that step begins again. It should benoted that, in the present embodiment, for as long as sampling is goingon (with oldest data samples removed and newest data samples inserted ina FIFO manner), the sampling can proceed at a certain sampling rate(e.g., 25 Hz) that, in the present embodiment, is the same rate at whichsamples were obtained for use in determining the gesture template. Also,as sampling is going on, the correlation and peak-to-peak metrics can becalculated/recalculated also at this same sampling rate in relation toeach new/revised window of samples. Again, in the present embodiment,the gesture template S has the same number of samples, L samples, as thewindow W. That said, it is not necessary in all embodiments orimplementations that the sampling rate for the gesture template/snippetbe the same as the gesture data sampling rate. Rather, in some alternateembodiments, even though the sampling rates for the gesture template andgesture data sampling are not the same, decimation can be used to makethem align before correlation is performed. For example, if a gesturetemplate/snippet is described as being sampled at 25 Hz and an incomingdata stream is sampled at 50 Hz, correlation (and, ultimately gesturerecognition) between the gesture template and the gesture data samplescan still be achieved following decimation of the gesture data sampleinformation by a factor of 2.

The evaluation performed by the electronic device 100 at the step 1526as to whether a gesture has occurred, based upon calculated p2p andcorrelation metrics, can take a variety of forms depending upon theembodiment or circumstance, some examples of which are discussed furtherbelow. If based upon this evaluation at the step 1528 the electronicdevice 100 determines that a gesture has occurred, then the processadvances to a step 1530. At the step 1530, the electronic device 100 (orprocessor 204 thereof) determines whether there is some action to betaken that is triggered based upon the gesture recognition or detection.In some cases, no action will be taken, and in such cases uponcompletion of the step 1530 the process returns to the step 1510 inwhich all of the sampled data of the window is discarded and the processcan then end at the step 1512 or return to the step 1514. Alternatively,and typically, the electronic device 100 at the step 1530 determinesthat one or more actions are to be triggered based upon the recognizedgesture and, if such is the case, then the electronic device 100proceeds to a step 1532 at which the electronic device, or the processor204 thereof, or one or more other ones of the internal components 200thereof (or potentially even components or devices external or separateand distinct from the electronic device 100) perform those action(s).Actions can include haptic, audio, or visual feedback indicating thatthe electronic device 100 has registered a gesture as well launching ofan application. Upon completion of the performing of the actions at thestep 1532 (or at least triggering of those actions to occur), theprocess also returns to the step 1510 and subsequently proceeds toeither the step 1512 or the step 1514 (after which the process can againproceed with the step 1506).

It should be appreciated that the particular action or actions that canbe triggered by gesture recognition can encompass any of a wide varietyof actions. For example, in some cases, the electronic device 100 canrecord that a gesture has occurred in its memory portion 206 or providean output signal indicative of its recognition of that gesture, forexample, by way of one or more of the output devices 208. Such stored oroutput information can also include related data, such as the time atwhich the gesture occurred. Also, upon gesture recognition, theelectronic device 100 can provide an output signal by way of some othermechanism such as by way of one of the wireless transceivers 202 or thecomponent interface 212.

Also for example, the triggered action can involve an action in whichthe electronic device 100 takes on a new state in which the electronicdevice is ready to receive new inputs from the user, for example, by wayof the input devices 210, or ready to receive sensory inputs via thesensing devices 228, or signals from external devices such as by way ofthe wireless transceivers 202 or the component interface 212. Further,in some circumstances, the triggered action can involve taking an actionto shut down the electronic device 100 to reduce power usage or takesome other processing or control action. Also, the action(s) that aretriggered can vary depending upon the circumstances, such as usercontext, cloud computing based context, etc. Indeed, the actions thatcan be triggered in response to particular detection of gestures cantake on numerous forms depending upon the embodiment or context.

Although FIG. 15 provides a general description of an example processfor gesture detection, it should be appreciated that many variations ofthe general process represented by FIG. 15 are possible depending uponthe embodiment or implementation. For example, even though the abovediscussion concerning FIG. 15 envisions that all of the samples arediscarded at the step 1510, in other embodiments it is possible thatonly some samples are discarded or that samples are discarded in aparticular manner. For example, in at least some embodiments the oldestvalue is discarded when taking in a new value (i.e., typical FIFOoperation). Also, in some embodiments, even if a new value is considered“bad”, the “bad” value still can be kept and stored in the FIFOarrangement of data in the window (that is, the process may avoiddiscarding the “bad” data) if the received data in combination withearlier-received data suggest that the device position has not been“bad” for a long enough period of time as to justify discarding of thedata. In the above description, it is assumed that the values in thewindow are contiguous with respect to a sampling rate that matches thesampling rate of the gesture template.

Indeed, in some cases, the assessment of samples performed at the step1506 can result in a conclusion that, even though overall one or more ofthe samples demonstrate invalidity at the step 1508, one (or possiblymore) of the sample data values are “good” or acceptable. In some suchcases, rather than having all of the samples being discarded at the step1510 due to partial invalidity, instead the gesture detection processcan proceed (e.g., proceed to the step 1520) with the partly-invaliddata. Alternatively, in some cases it is possible that only certainone(s) being invalid data samples will be discarded while other datasamples (potentially ones that are valid or even one or more that areinvalid) are kept. For example, if one “good” sample was determined tobe present at the step 1506, then at the step 1510, for example, fourother samples could be discarded and then at the step 1514 four newsamples could be taken, even while the “good” sample was kept. Then(repeating), if one of those 4 new samples is “good”, there will be atleast 4 more samples taken after the second “good” sample.

In this regard, it should be noted that, typically, it is desirable forall of the data samples stored in the window to be data samples thatwere received in a contiguous manner (that is, each successive datasample in the window corresponds to data received at a successive time,where the time elapsed between each successive sample and the previoussample is the same in accordance with the data sampling rate).Nevertheless, in at least some circumstances in which data samples arediscarded as discussed above, it is possible that the time elapsedbetween each successive sample in the window will not be the same.

It should further noted that, more generally, various embodiments ofgesture detection processes in which different sample data can bediscarded in selective manners (even though other sample data is keptand not discarded) can be advantageous in that such manners of operationcan allow certain of the samples to be “bad” without requiringtransition to a “Don't Collect Data” state as discussed above inrelation to FIG. 14. Further, this can provide a “fuzzy” mechanism forallowing intermittent “noise” and avoiding a strict requirement that allthe samples be captured while the electronic device 100 is stationary,for the purpose of accurately detecting tilt or orientation values(which might otherwise be perturbed by motion) or otherwise. That is,when tilt and orientation values are being detected for determininggesture validity, values within loose range(s) can be accepted to allowfor perturbations (and to allow for the fact that, in many cases,gestures of interest will lack portions of the gesture that arestationary).

Still referring to the gesture detection process of FIG. 15, yet oneadditional example gesture detection process generally in accordancewith FIG. 15 and requiring the collecting of L contiguous sets of(x,y,z) data samples (values to fill the window of data samples)proceeds as follows. Upon commencement of the process, a first set ofdata samples (x,y,z) is received, and that set is assessed forcompatibility with the gesture, in terms of position, tilt, andorientation (e.g., corresponding to the steps 1508 and 1510 of FIG. 15).If that first set of data is determined to be “good”, the set is savedin the window; otherwise, that set is tossed out and a new data sampleis obtained. Eventually, upon receipt of an initial “good” data sampleset (x,y,z), that data sample set is stored as the first set (set 1) ofthe sample data stored in the window. Subsequently, additional datasample sets are collected. As each new data sample set is received, itis assessed for compatibility/validity, again in terms of position,tilt, and orientation.

Further in this present example, assuming that a first set of datasamples is received and that is deemed valid or “good”, subsequent setsof data samples will also be added to the window even if those datasamples are “bad” so long as five (5) consecutive sets of the “bad”(invalid/incompatible) data samples are not received. Alternatively, iffive “bad” data sample sets are received in a row, the gesture detectionprocess will discard all of the data samples from the window and startthe process over again. That is, if five “bad” data sample sets are everreceived in a row, then the whole window of sampled data (all of thedata stored in the FIFO manner) is cleared and detection restarts (and afirst new data sample is not accepted into a new window until a first“good” data sample set is received). However, even one or more “bad”data sample sets are obtained, if five such sets are never obtained in arow, then these “bad” data sample sets are kept stored in the window(and are stored in the FIFO manner).

Eventually, as a result of the ongoing sampling of data, the windowbecomes filled with sampled data, particularly with data sets 1 throughL, which are stored in the FIFO manner. At this point, then thepeak-to-peak and correlation metrics are calculated and assessed toperform gesture detection (e.g., steps corresponding to the steps 1520,1522, 1526, and 1528 of FIG. 15). If a gesture is detected, all of thedata in the window is cleared and the gesture detection process beginsanew. However, if a gesture is not detected based upon the assessment ofmetrics, then only one of the data sample sets is removed and only onenew data sample set is obtained and considered. Particularly in thepresent embodiment, where the data sample sets are stored in the windowin the FIFO manner, although it is particularly the first set of sampledata (set 1) that is removed in this case, the new data sample set thatis collected does not take the place of the first set in the window butrather is entered as the last data set (set (L+1)).

As already mentioned above, in this example embodiment, the process ofreplacing data sets is subject to the rule discussed above in which, iffive “bad” data sample sets are received in a row, then all of the datasample sets of the window are entirely cleared and the obtaining of datasample starts entirely over. Thus, in the above-mentioned circumstancewhere the existing window of data samples is not indicative of a gestureand so the first data sample set is discarded and the new (L+1) datasample set is received, the process considers whether this new data setin combination with each of the preceding four data sets is “bad” (e.g.,whether each of the data sets L+1, L, L−1, L−2, and L−3 is “bad”). Ifso, then all of the data sample sets are cleared from the window but, ifnot, then the window now holds a full window of data (e.g., given thediscarding of data set 1, the window would then include data sets 2through L+1) and, with this window of data, the metrics can again becalculated and checked for gesture detection.

In addition to the above discussion, it should further be appreciatedthat the particular values of the peak-to-peak and correlation metrics(and/or possibly other metrics as well) interpreted as signifying theoccurrences of gestures can vary widely based upon a variety of factors,including for example the embodiment, the type of electronic device, thetype(s) of accelerometer(s) and/or other sensing device(s) used to senseposition/movement data, whether there are other forms of informationused to perform the gesture recognition in addition to theposition/movement data, the type(s) of gestures being detected, and thedegree to which it is desired that ambiguous movements will berecognized as particular gestures or not. Also, depending upon suchfactors, only some available metrics may be considered and others neednot be considered. For example, in one circumstance the peak-to-peakmetric associated with x-axis movement may be of significance in gesturerecognition but the peak-to-peak metric associated with y-axis movementmay not be of any significance to the gesture recognition, but inanother circumstance each of these peak-to-peak metrics may be ofsignificance.

Notwithstanding the high degree of variability that is possible in thisregard, in one example embodiment in which fist bump gestures are to bedetected, the following particular criteria can be used for gesturerecognition:

(a) In determining the starting position validity (the determinationmade at the step 1508 of FIG. 15), it is necessary that abs(tilt)<35 andabs(abs(orientation−90)>60) in order for the position of the electronicdevice 100 to be considered to be valid for the possible occurrence of afist bump gesture;

(b) In determining the tilt/orientation validity (the determination madeat the step 1518 of FIG. 15), it is necessary to have tilt>35 (ideallynear 90, but motion perturbs the value and so a larger allowance can berequired) in order for the tilt/orientation of the electronic device 100to be considered to be valid for the possible occurrence of a fist bumpgesture;

(c) In determining whether detected movement is considered to be a fistbump gesture, both peak-to-peak metrics and correlation metrics areconsidered. With respect to the peak-to-peak metrics (the determinationmade at steps 1520, 1522 of FIG. 15), the x-axis peak-to-peak metric(x_p2p) needs to be >0.6G (needs to be high enough to show propermotion), and the y-axis peak-to-peak metric (y_p2p) needs to be <2G (1Gis expected based on twist, larger than 2G is too large). However, thez-axis peak-to-peak metric is not considered in determining whether thefist bump gesture has occurred.

(d) Further, with respect to the correlation metrics (the determinationmade at steps 1526, 1528 of FIG. 15), only the y-axis correlation metric(y_corr) needs to be considered, and specifically y_corr should be >0.85(high enough to show pattern matching). Assuming each of theaforementioned peak-to-peak and correlation metrics are satisfied, thedetected movement is recognized to constitute an instance of the fistbump gesture type.

Thus, in this example, x-axis motion is of significance to the gesturedetermination in terms of its effect on the x-axis peak-to-peak metric,but is not of significance in terms of the correlation metric. Also,although the y-axis movement is taken into account both in terms of thepeak-to-peak and the correlation metrics, its effect upon thecorrelation metric is of greater significance with respect to theoverall gesture determination. Further, in this example, beyond the tiltdetermination and y-axis metrics, z-axis movement adds no value to thegesture determination. Additionally, given the high significance of they-axis movement to the correlation metrics, relative lesser importanceof y-axis movement to the peak-to-peak metrics, and the highsignificance of the x-axis movement to the peak-to-peak metrics, it ispossible to develop simplified metrics for recognizing the fist bumpgesture, for example, as represented by the following equation:y_corr+(x_p2p/2G)>1.25  (18)Given such an equation, it should be understood that if y_corr>0.85 andx_p2p>0.8G, then the fist bump gesture is recognized, and also that ify_corr>0.95 and x_p2p>0.6G, then the fist bump gesture is alsorecognized. Further, the combination of y_corr and x_p2p in this mannershows that higher confidence in y_corr correspondingly allows forrecognition of the fist bump gesture notwithstanding lower x_p2p, andthat lower confidence in y_corr correspondingly requires higherconfidence in x_p2p. It additionally should be noted that thiscombination of y_corr and x_p2p can be scaled to reflect the score orestimated likelihood that the gesture occurred.

The above-described fist bump gesture example generally illustratesimportant aspects regarding how a gesture template is measured andformed along with how the metrics are interpreted and used for gesturerecognition. In this fist bump gesture example, and in accordance withthe flow chart 1500 of FIG. 15, starting position is monitored andunnecessary computations are prevented when the starting positionrequirements are not met. Also, an ending position metric is used.Features along the x axis allow simpler processing (just p2p tracking),and features along the y axis are fully utilized (correlation and p2p),but features along the z axis are unimportant with respect to the abovemetrics. Additionally as discussed, metrics can be combined (again asshown in the above example involving linear combination of y_corr andx_p2p).

Further, in another example embodiment in which handwave gestures are tobe detected, the following criteria can be used for gesture recognition:

(a) To begin, starting position and tilt/orientation are monitored todetermine whether a valid gesture can be occurring at this time (thedeterminations made at the steps 1508 and 1518 of FIG. 15), so thatunnecessary computations are prevented when the starting positionrequirements are not met. With respect to the handwave gesture, forvalidity to be determined in this embodiment, abs(tilt)>35 andabs(abs(orientation−90)>60).

(b) Additionally, to determine whether a handwave gesture has occurred,correlation metrics for each axis are calculated (at the step 1526). Inthe case of a handwave gesture, the most movement is on the y-axis, andso to determine that a handwave gesture has occurred, the correlationmetric on the y-axis should exceed a threshold and the sum of all threecorrelation metrics (x, y, z) also should exceed a threshold. Incontrast to the manner of recognizing the fist bump gesture describedabove, and although further testing and optimization may lead toincluding comparing peak-to-peak metrics to thresholds, in the presentembodiment, peak-to-peak metrics are not evaluated to determine whethera handwave gesture has occurred.

Additionally, in another example embodiment in which handshake gesturesare to be detected, the following criteria can be used for gesturerecognition:

(a) To begin, starting position and tilt/orientation are monitored todetermine whether a valid gesture can be occurring at this time (thedeterminations made at the steps 1508 and 1518 of FIG. 15), so thatunnecessary computations are prevented when the starting positionrequirements are not met. With respect to the handshake gesture, forvalidity to be determined in this embodiment, abs(tilt)>35 andabs(abs(orientation−90)<30).

(b) Additionally, to determine whether a handshake gesture has occurred,correlation metrics for each axis (x, y, z) are calculated (thecalculations made at the step 1526). In particular, the correlation onthe y-axis should exceed a threshold, and also the sum of all threecorrelation metrics (for each axis) should exceed a threshold.

(c) Further, to determine whether a handshake gesture has occurred, p2pmetrics are also calculated for each axis. For detection, the p2p metricfor the y-axis should exceed fractions of the other p2p metrics, and thep2p metric for the y-axis should exceed 2G.

Notwithstanding the particular description provided above, the presentdisclosure is intended to encompass numerous additional variations. Forexample, although the state diagram 1400 of FIG. 14 and flow chart 1500of FIG. 15 envision that, at any given time, a particular type ofgesture is being detected, in fact multiple instances of the statediagram and flow chart can be operating simultaneously for the purposeof detecting multiple or many different types of gesturessimultaneously. Each gesture type can have a separate/distinct statemachine pertaining thereto, and/or each gesture can have its own windowsize (e.g., in terms of the number of data samples L) or in terms ofother characteristics. Further for example, certain of the operationsdiscussed in regard to FIG. 15 (e.g., the steps 1508, 1518, 1522, and1528) can involve consideration of how the detected samples,tilt/orientation values, correlation metrics, or peak-to-peak metricsare indicative of whether any instance(s) of any of multiple types ofgestures have occurred and/or whether any portion(s) of sensed gesturedata is/are indicative of any occurrence(s) of any instance(s) of any ofmultiple types of gestures.

Also, the processing that is performed in relation to the steps 1508,1518, 1522, and 1528 in determining whether a valid gesture may possiblyhave occurred, and/or whether an instance of a given type of gesture infact has occurred, can vary considerably. For example, whether a givenvalue of a correlation metric will be interpreted as indicative ofwhether an instance of a given gesture type has occurred can depend uponnumerous other factors, for example, information regarding anoperational context of or instruction received by the electronic device.Depending upon the circumstance, correlation or peak-to-peak metricvalues (or scores) calculated in relation to given gesture data can beinterpreted in different manners, with scores being attributed in avariety of manners. Further, the definition of a gesturetemplate/snippet can vary depending upon the implementation, device,circumstance of operation, etc. In some cases, the gesturetemplate/snippet can be determined in a manner that takes into accountother factors in addition to physiological patterns. For example, insome cases, gesture templates/snippets as well as criteria/metrics forrecognizing gestures can be varied to reflect operational or usercontext information such as time of day, or whether the user had set avolume setting of the device to a particular level (which could indicatea particular use environment that might impact gesture behavior).

Embodiments of the present disclosure are applicable to numerousenvironments, devices, applications, and circumstances. Among otherthings, embodiments of the present disclosure are applicable to avariety of implementations in wearable products, products used inrelation to a variety of body locations, products employing numerousdifferent types of sensors, and products configured to sense numerousdifferent types of gestures. Detection of gestures can partly dependupon, and/or used in connection with, knowledge about the user's context(e.g., user's location and/or cloud computing based context) and can bean immediate and natural way to initiate and activate numerous differenttypes of functionality in the device with respect to which the gesturesare being sensed, or even in other devices that are in communicationwith the device with respect to which the gestures are being sensed.

Thus, it is specifically intended that the present invention not belimited to the embodiments and illustrations contained herein, butinclude modified forms of those embodiments including portions of theembodiments and combinations of elements of different embodiments ascome within the scope of the following claims.

What is claimed is:
 1. A method of recognizing spatial gestures of anelectronic device, the method comprising: obtaining a gesture templatethat includes movement data representative of a particular gesture type;obtaining, by one or more processors of the electronic device and from amotion sensing component of the electronic device, motion dataindicative of motion of the electronic device; calculating, by the oneor more processors, a correlation metric based at least part on a meanvalue of the movement data of the gesture template, a variance of themovement data of the gesture template that is based in part on the meanvalue of the movement data of the gesture template, the motion data, andthe gesture template; determining, based at least in part on thecorrelation metric, that a gesture of the particular gesture type hasoccurred, and performing, in response to determining that the gesture ofthe particular gesture type has occurred, at least one action.
 2. Themethod of claim 1, wherein the movement data for the particular gesturetype includes a first number of values and the gesture data includes asecond number of values.
 3. The method of claim 2, wherein the firstnumber equals the second number.
 4. The method of claim 1, wherein thecorrelation metric is calculated based at least in part on a modifiedvariance of the motion data and a modified covariance of the motiondata, wherein each of the modified variance and modified covariance iscalculated at least in part based on the mean value.
 5. The method ofclaim 4, wherein the correlation metric (M_(corr)) is calculated basedon the following equation:$M_{corr} = {{\hat{\rho}}_{s,w} = \frac{{\hat{\sigma}}_{s,w}}{\sigma_{s}{\hat{\sigma}}_{w}}}$wherein each of M_(corr) and {circumflex over (ρ)}_(s,w) isrepresentative of the correlation metric, {circumflex over (σ)}_(s,w) isrepresentative of the modified covariance of the motion data,{circumflex over (σ)}_(w) is representative of a standard deviation ofthe motion data that is equal to the square root of the modifiedvariance of the motion data, and σ_(s) is representative of anadditional standard deviation that is equal to the square root of thevariance of the movement data of the gesture template.
 6. The method ofclaim 1, wherein the determination that the gesture has occurred isfurther based on a peak-to-peak metric of the motion data.
 7. The methodof claim 6, further comprising: determining, based at least in part onthe motion data, that the motion data is appropriate for an occurrenceof a gesture of the particular gesture type.
 8. The method of claim 7,wherein determining that the motion data is appropriate for theoccurrence of a gesture of the particular gesture type is further basedon one or more of a position of the electronic device, a tilt of theelectronic device, or an orientation of the electronic device asindicated by at least some of the motion data.
 9. The method of claim 1,further comprising: responsive to determining that the motion data isinconsistent with a gesture type of the particular gesture, discardingan old value included in the motion data and obtaining a new value to soas to update the motion data.
 10. The method of claim 1, wherein theelectronic device is a wearable mobile device, and wherein the at leastone action includes outputting a signal by way of an output device ofthe wearable mobile device.
 11. A method of recognizing gestures, themethod comprising: obtaining a gesture template that includes movementdata representative of a particular gesture type; determining, by one ormore processors of a mobile device, that a status of the mobile deviceis appropriate for an occurrence of a gesture of the particular gesturetype based on one or more of a detected position of the mobile device, adetected tilt of the mobile device, and a detected orientation of themobile device; responsive to determining that the status is appropriatefor the occurrence of a gesture of the particular gesture type,obtaining, by the one or more processors and from an accelerometer ofthe mobile device, motion data; determining, by the one or moreprocessors, that the motion data includes a sufficient number of samplesto allow for recognition of a gesture of the particular gesture type;calculating, by the one or more processors, a correlation metric basedat least on the motion data and the gesture template; and responsive todetermining, based at least in part on the correlation metric, that agesture of the particular gesture type has occurred taking at least oneaction.
 12. The method of claim 11, wherein determining the correlationmetric comprises: determining the correlation metric based at least onthe motion data, the gesture template, a mean value of the movement dataof the gesture template, and a variance of the movement data of thegesture template that is based in part on the mean value of the movementdata of the gesture template.
 13. The method of claim 12, wherein thedetermining that the gesture of the particular gesture type has occurredis further based at least in part on a peak-to-peak metric of the motiondata.
 14. The method of claim 12, wherein the correlation metric(M_(corr)) is calculated based on the following equation:$M_{corr} = {{\hat{\rho}}_{s,w} = \frac{{\hat{\sigma}}_{s,w}}{\sigma_{s}{\hat{\sigma}}_{w}}}$wherein each of M_(corr) and {circumflex over (ρ)}_(s,w) isrepresentative of the correlation metric, {circumflex over (σ)}_(s,w) isrepresentative of a modified covariance of the motion data, {circumflexover (σ)}_(w) is representative of a standard deviation of the motiondata that is equal to the square root of a modified variance of themotion data, and σ_(s) is representative of an additional standarddeviation that is equal to the square root of the variance of themovement data of the gesture template.
 15. The method of claim 12,wherein the calculating of the correlation metric is not based on a meanvalue determined based on the motion data.
 16. A mobile devicecomprising: a motion sensing component configured to generate motiondata indicative of motion of the mobile device; at least one memorydevice configured to store a gesture template that includes movementdata representative of a particular gesture type; at least oneprocessing device coupled to the motion sensing component and the memorydevice, wherein the processing device is configured to: calculate acorrelation metric based at least in part on the motion data, thegesture template, and a mean value of the movement data of the gesturetemplate, and a variance of the movement data of the gesture templatethat is based in part on the mean value of the movement data of thegesture template; determine, based at least in part on the correlationmetric, that a gesture of the particular gesture type has occurred; andperform, in response to determining that the gesture of the particulargesture type has occurred, at least one action.
 17. The mobile device ofclaim 16, wherein the motion sensing component includes one or more ofan accelerometer, a gyroscope, and a barometer.
 18. The mobile device ofclaim 16, wherein the at least one processing device is furtherconfigured to: calculate a peak-to-peak metric of the motion data, anddetermine that the gesture of the particular gesture type has occurredfurther based at least in part on the peak-to-peak metric of the motiondata.
 19. The mobile device of claim 16, wherein the at least oneprocessing device operates in accordance with a state machine having afirst state that involves not collecting the motion data, a second statethat does involve collecting the motion data, and a third state thatinvolves assessing the motion data, wherein the assessing includes thecalculating of the correlation metric.
 20. The mobile device of claim16, wherein the at least one processing device is further configured to:determine that a status of the mobile device is appropriate for anoccurrence of a gesture of the particular gesture type based on one ormore of a detected position of the mobile device, a detected tilt of themobile device, and a detected orientation of the mobile device; andcalculate the correlation metric in response to determining that thestatus is appropriate for the occurrence of a gesture of the particulargesture type.